fetcher/curl: Fix invalid memory access in finalize()
authorKalev Lember <klember@redhat.com>
Tue, 7 Nov 2017 15:10:45 +0000 (16:10 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 7 Nov 2017 15:37:20 +0000 (15:37 +0000)
commit176a7b4778fbacbbb0824cf8c612656cd0985499
tree1f2373c48ef1300a9c256b25931b1d83e11981c9
parent7d2ad351c42c9f4bf3d0d8f88815458e84d9677e
fetcher/curl: Fix invalid memory access in finalize()

Reorder cleanup functions so that curl_multi_cleanup() runs before
self->sockets is destroyed. This avoids an assert and invalid memory
access in sock_cb where self->sockets is dereferenced during
curl_multi_cleanup().

Closes: https://github.com/ostreedev/ostree/issues/1331
Closes: #1332
Approved by: cgwalters
src/libostree/ostree-fetcher-curl.c